package com.zhenyi.zhengfang.admin.index;

import java.io.File;
import java.util.ArrayList;
import java.util.Date;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

import com.jfinal.kit.Kv;
import com.jfinal.plugin.activerecord.Page;
import com.jfinal.plugin.activerecord.Record;
import com.jfinal.plugin.activerecord.SqlPara;
import com.utils.PathUtils;
import com.zhengfang.common.model.ZfUser;

import cn.hutool.core.date.DateUtil;
import cn.hutool.poi.excel.ExcelUtil;

public class UserController extends ZFAdminController {
	@Override
	public void list() {
		Date startTime = getStartTime();
		Date endTime = getEndTime();
		Kv kv = getSimpleKv("keyword", "type");
		kv.set("startTime", startTime);
		kv.set("endTime", endTime);
		SqlPara sqlPara = db.getSqlPara("ZfUser", kv);
		Page<Record> pages = db.paginate(getPage(), getPageSize(), sqlPara);
		setRainbow(pages);
		setItems(pages.getList());
		render("/zf/admin/userinfo/list.html");
	}

}